package com.zx.tfw.enums;

import java.util.HashMap;
import java.util.Map;

public enum TypeEnum {
	
	Java		(1001, "Java"),
	J2EE		(1002, "J2EE"),
	ORM			(1003, "ORM 框架"),
	API			(1004, "API 网关"),
	service		(1005, "服务调用"),
	job			(1006, "作业调度"),
	mq			(1007, "消息队列"),
	register	(1008, "注册/配置中心"),
	trace		(1009, "链路追踪"),
	protal		(1020, "传输协议"),
	server		(1011, "服务器"),
	anquan		(1012, "安全/支付"),
	web			(1013, "Web 框架"),
	cache		(1014, "缓存"),
	db			(1015, "数据库"),
	dbpool		(1016, "数据库连接池"),
	dbproxy		(1017, "数据库中间件"),
	tran		(1018, "分布式事务"),
	luncene		(1019, "搜索引擎"),
	tool		(1020, "工具类"),
	manager		(1021, "监控管理"),
	docker		(1022, "容器服务"),
	ide			(1023, "开发工具"),
	bigData		(1024, "大数据"),
	comeOn		(1025, "开箱即用"),
	mysife		(1026, "自我修养");
	
	private int code;
	
	private String name;

	private TypeEnum(int code, String name) {
		this.code = code;
		this.name = name;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	private static Map<Integer, TypeEnum> map;
	static {
		map = new HashMap<>();
		TypeEnum[] values = TypeEnum.values();
		for (TypeEnum typeEnum : values) {
			map.put(typeEnum.getCode(), typeEnum);
		}
	}
	
	public static Map<Integer, TypeEnum> asMap(){
		return map;
	}
}
